import 'package:flutter_getx_project/generated/json/base/json_convert_content.dart';
import 'package:flutter_getx_project/entity/version_entity.dart';

VersionEntity $VersionEntityFromJson(Map<String, dynamic> json) {
	final VersionEntity versionEntity = VersionEntity();
	final int? code = jsonConvert.convert<int>(json['code']);
	if (code != null) {
		versionEntity.code = code;
	}
	final String? message = jsonConvert.convert<String>(json['message']);
	if (message != null) {
		versionEntity.message = message;
	}
	final VersionData? data = jsonConvert.convert<VersionData>(json['data']);
	if (data != null) {
		versionEntity.data = data;
	}
	return versionEntity;
}

Map<String, dynamic> $VersionEntityToJson(VersionEntity entity) {
	final Map<String, dynamic> data = <String, dynamic>{};
	data['code'] = entity.code;
	data['message'] = entity.message;
	data['data'] = entity.data?.toJson();
	return data;
}

VersionData $VersionDataFromJson(Map<String, dynamic> json) {
	final VersionData versionData = VersionData();
	final int? version = jsonConvert.convert<int>(json['version']);
	if (version != null) {
		versionData.version = version;
	}
	final String? versionName = jsonConvert.convert<String>(json['versionName']);
	if (versionName != null) {
		versionData.versionName = versionName;
	}
	final String? content = jsonConvert.convert<String>(json['content']);
	if (content != null) {
		versionData.content = content;
	}
	final String? url = jsonConvert.convert<String>(json['url']);
	if (url != null) {
		versionData.url = url;
	}
	final bool? isForce = jsonConvert.convert<bool>(json['isForce']);
	if (isForce != null) {
		versionData.isForce = isForce;
	}
	return versionData;
}

Map<String, dynamic> $VersionDataToJson(VersionData entity) {
	final Map<String, dynamic> data = <String, dynamic>{};
	data['version'] = entity.version;
	data['versionName'] = entity.versionName;
	data['content'] = entity.content;
	data['url'] = entity.url;
	data['isForce'] = entity.isForce;
	return data;
}